﻿@model FileInfo[]
@{
    ViewBag.Title = "试图数据列表";

    ViewBag.jQuery = true;
    ViewBag.jQueryUI = true;
    ViewBag.Json = true;
    ViewBag.Flexigrid = true;
    ViewBag.Global = true;

    ViewBag.Css = "/Content/ViewSetting/Site.css";
    ViewBag.Js = "/Content/" + ViewContext.RouteData.Values["ViewForder"] + "/" + ViewContext.RouteData.Values["ViewName"] + ".js";
    
    Layout = "~/Views/_Template.cshtml";
}
<table id="MainTable" cellpadding="0" cellspacing="4" width="100%">
    <tr id="TitleTR"><td class="PageTitle"><div class="Title">试图数据设置</div></td></tr>   
    <tr><td>
        <table id="SettingList" class="flexme3">
            <tbody> 
@{ 
    var TempUrl = "";
    foreach (FileInfo FI in @Model)
    {
        switch(ViewContext.RouteData.Values["KeyA"].ToString())
        {
            case "JsonSetting":
                TempUrl = String.Format("http://{0}/ViewSetting/JsonSetting/{1}/{2}?Permissions={3}", Request.Url.Authority, ViewContext.RouteData.Values["KeyA"], FI.Name.ToString().Substring(0, FI.Name.ToString().LastIndexOf(".")), Server.UrlEncode(Request.QueryString["Permissions"]));
                break;
            default :
                TempUrl = String.Format("http://{0}/ViewSetting/SettingView/{1}/{2}?Permissions={3}", Request.Url.Authority, ViewContext.RouteData.Values["KeyA"], FI.Name.ToString().Substring(0, FI.Name.ToString().LastIndexOf(".")), Server.UrlEncode(Request.QueryString["Permissions"]));
                break;                    
        }
                <tr>
	                <td>@ViewContext.RouteData.Values["KeyA"]</td>              
	                <td>@FI.Name.ToString().Substring(0,FI.Name.ToString().LastIndexOf("."))</td>  
	                <td>@FI.FullName</td> 
	                <td><a href="@Html.Raw(Tools.AsynchronousLogin.GetAsynchronousLoginUrl(TempUrl, Request.QueryString["Permissions"]))">Link</a></td>  
                </tr>
    }
}
            </tbody>
        </table>
    </td></tr>
</table>